<template>
    <div>
        <ElDialog :model-value="visibleVal" :before-close="closeFunc">
            <div v-if="visibleVal">this dialog: {{ visibleVal }}</div>
        </ElDialog>
    </div>
</template>
<script>
import { ElDialog } from 'element-plus';
export default {
    components: {
        ElDialog
    },
    props: {
        visible: {
            type: Boolean,
            default: false
        },
        closeFunc: {
            type: Function,
            default: () => {}
        }
    },
    data(){
        return{
            visibleVal: this.visible
        }
    },
    methods: {
    },
    mounted() {
        console.log(this.visibleVal);
    },
}
</script>

